<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>KSYMediaInfoProber Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">KSYMediaPlayer_iOS </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">Kingsoft</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	
	<optgroup label="Properties">
		
		<option value="//api/name/bAACCodec">bAACCodec</option>
		
		<option value="//api/name/bAccelerate">bAccelerate</option>
		
		<option value="//api/name/bH264Codec">bH264Codec</option>
		
		<option value="//api/name/bHEVCCodec">bHEVCCodec</option>
		
		<option value="//api/name/bMP3Codec">bMP3Codec</option>
		
		<option value="//api/name/ksyMediaInfo">ksyMediaInfo</option>
		
		<option value="//api/name/timeout">timeout</option>
		
		<option value="//api/name/url">url</option>
		
	</optgroup>
	

	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/getVideoThumbnailImageAtTime:width:height:">- getVideoThumbnailImageAtTime:width:height:</option>
		
		<option value="//api/name/getVideoThumbnailImageAtTime:width:height:accurate:">- getVideoThumbnailImageAtTime:width:height:accurate:</option>
		
		<option value="//api/name/initWithContentURL:">- initWithContentURL:</option>
		
		<option value="//api/name/setHttpHeaders:">- setHttpHeaders:</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">KSYMediaInfoProber Class Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Inherits from</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>KSYMediaInfoProber.h</td>
</tr>
						</tbody></table></div>
					

                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>KSYMediaInfoProber</p>
					</div>
					
					

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/initWithContentURL:" title="initWithContentURL:"></a>
	<h3 class="method-title"><code><a href="#//api/name/initWithContentURL:">&ndash;&nbsp;initWithContentURL:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>初始化文件格式探测器并设置播放地址</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (instancetype)initWithContentURL:(NSURL *)<em>url</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>url</code></th>
						<td><p>待探测格式的文件地址，该地址可以是本地地址或者服务器地址.</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>返回KSYMediaInfoProber对象</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="warning"><p><strong>Warning:</strong> 必须调用该方法进行初始化，不能调用init方法。</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaInfoProber.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/timeout" title="timeout"></a>
	<h3 class="method-title"><code><a href="#//api/name/timeout">&nbsp;&nbsp;timeout</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>文件格式探测时间，单位是秒，默认值是3秒</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic) NSTimeInterval timeout</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>超过该时间未探测到文件格式时，直接返回</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaInfoProber.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/bAccelerate" title="bAccelerate"></a>
	<h3 class="method-title"><code><a href="#//api/name/bAccelerate">&nbsp;&nbsp;bAccelerate</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>是否要加速探测速度</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic) BOOL bAccelerate</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>加速后，探测格式可能不完整，默认不加速</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaInfoProber.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/setHttpHeaders:" title="setHttpHeaders:"></a>
	<h3 class="method-title"><code><a href="#//api/name/setHttpHeaders:">&ndash;&nbsp;setHttpHeaders:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>发送http请求时需要header带上的字段</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)setHttpHeaders:(NSDictionary *)<em>headers</em></code></div>

		    
			

			

			
			<div class="method-subsection availability">
				<h4 class="method-subtitle parameter-title">Availability</h4>
				<p>Available in <a href="../Classes/KSYMoviePlayerController.html">KSYMoviePlayerController</a> 2.1.0 and later.</p>
			</div>
			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaInfoProber.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/url" title="url"></a>
	<h3 class="method-title"><code><a href="#//api/name/url">&nbsp;&nbsp;url</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>待探测的文件格式地址</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, copy) NSURL *url</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>可不释放KSYMediaInfoProber实例，通过设置contentURL来完成下一次探测</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaInfoProber.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/bH264Codec" title="bH264Codec"></a>
	<h3 class="method-title"><code><a href="#//api/name/bH264Codec">&nbsp;&nbsp;bH264Codec</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>编码类型是否是h264</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) BOOL bH264Codec</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>获取此属性前至少要调用一次[ksyMediaInfo]，方可得到正确的结果</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaInfoProber.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/bHEVCCodec" title="bHEVCCodec"></a>
	<h3 class="method-title"><code><a href="#//api/name/bHEVCCodec">&nbsp;&nbsp;bHEVCCodec</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>编码类型是否是hevc</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) BOOL bHEVCCodec</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>获取此属性前至少要调用一次[ksyMediaInfo]，方可得到正确的结果</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaInfoProber.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/bAACCodec" title="bAACCodec"></a>
	<h3 class="method-title"><code><a href="#//api/name/bAACCodec">&nbsp;&nbsp;bAACCodec</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>编码类型是否是aac</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) BOOL bAACCodec</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>获取此属性前至少要调用一次[ksyMediaInfo]，方可得到正确的结果</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaInfoProber.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/bMP3Codec" title="bMP3Codec"></a>
	<h3 class="method-title"><code><a href="#//api/name/bMP3Codec">&nbsp;&nbsp;bMP3Codec</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>编码类型是否是mp3</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) BOOL bMP3Codec</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>获取此属性前至少要调用一次[ksyMediaInfo]，方可得到正确的结果</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaInfoProber.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/ksyMediaInfo" title="ksyMediaInfo"></a>
	<h3 class="method-title"><code><a href="#//api/name/ksyMediaInfo">&nbsp;&nbsp;ksyMediaInfo</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>媒体信息, 具体对象类型为<a href="../Classes/KSYMediaInfo.html">KSYMediaInfo</a></p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) KSYMediaInfo *ksyMediaInfo</code></div>

		    
			

			

			
			<div class="method-subsection availability">
				<h4 class="method-subtitle parameter-title">Availability</h4>
				<p>Available in <a href="../Classes/KSYMoviePlayerController.html">KSYMoviePlayerController</a> 1.5.3 and later.</p>
			</div>
			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>未探测到文件格式时为nil</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaInfoProber.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/getVideoThumbnailImageAtTime:width:height:" title="getVideoThumbnailImageAtTime:width:height:"></a>
	<h3 class="method-title"><code><a href="#//api/name/getVideoThumbnailImageAtTime:width:height:">&ndash;&nbsp;getVideoThumbnailImageAtTime:width:height:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>获取视频缩略图</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (UIImage *)getVideoThumbnailImageAtTime:(NSTimeInterval)<em>seekTime</em> width:(int)<em>width</em> height:(int)<em>height</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>seekTime</code></th>
						<td><p>指定的时间位置，单位为s, 小于0时无法截图</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>width</code></th>
						<td><p>缩略图的宽度</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>height</code></th>
						<td><p>缩略图的高度</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>返回UIImage对象，即为缩略图</p>
			</div>
			

			
			<div class="method-subsection availability">
				<h4 class="method-subtitle parameter-title">Availability</h4>
				<p>Available in <a href="../Classes/KSYMoviePlayerController.html">KSYMoviePlayerController</a> 1.8.2 and later.</p>
			</div>
			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>缩略图宽度和高度说明</p>

<ul>
<li>指定缩略图宽度和高度都为0时，输出的缩略图与原视频中的宽高相同</li>
<li>指定缩略图宽度不为0，高度为0时，高度会根据原视频的宽高比例做出缩放</li>
<li>指定缩略图高度不为0，宽度为0时，宽度会根据原视频的宽高比例作出缩放</li>
</ul>

			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaInfoProber.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/getVideoThumbnailImageAtTime:width:height:accurate:" title="getVideoThumbnailImageAtTime:width:height:accurate:"></a>
	<h3 class="method-title"><code><a href="#//api/name/getVideoThumbnailImageAtTime:width:height:accurate:">&ndash;&nbsp;getVideoThumbnailImageAtTime:width:height:accurate:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>精准获取视频缩略图</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (UIImage *)getVideoThumbnailImageAtTime:(NSTimeInterval)<em>seekTime</em> width:(int)<em>width</em> height:(int)<em>height</em> accurate:(BOOL)<em>accurate</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>seekTime</code></th>
						<td><p>指定的时间位置，单位为s, 小于0时无法截图</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>width</code></th>
						<td><p>缩略图的宽度</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>height</code></th>
						<td><p>缩略图的高度</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>accurate</code></th>
						<td><p>指定是否使用精准获取缩略图</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>返回UIImage对象，即为缩略图</p>
			</div>
			

			
			<div class="method-subsection availability">
				<h4 class="method-subtitle parameter-title">Availability</h4>
				<p>Available in <a href="../Classes/KSYMoviePlayerController.html">KSYMoviePlayerController</a> 2.9.6 and later.</p>
			</div>
			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>缩略图宽度和高度说明</p>

<ul>
<li>指定缩略图宽度和高度都为0时，输出的缩略图与原视频中的宽高相同</li>
<li>指定缩略图宽度不为0，高度为0时，高度会根据原视频的宽高比例做出缩放</li>
<li>指定缩略图高度不为0，宽度为0时，宽度会根据原视频的宽高比例作出缩放</li>
<li>如果accurate为NO，只能获取关键帧的缩略图；如果为YES，则按照seekTime精准获取缩略图</li>
</ul>

			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaInfoProber.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2018 Kingsoft. All rights reserved. </p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>
